#pragma once

#include <QObject>

#include "dpkg-db.h"

class DpkgPrivate;
class Dpkg : public QObject
{
    Q_OBJECT
public:
    explicit Dpkg(QObject *parent = nullptr);
    ~Dpkg();

    void LoadStatus();
    const QList<PKGInfo> &available();
    const QList<PKGInfo> &installed();

    const PKGInfo &GetPackageInfo(const QString &name);

Q_SIGNALS:
    void Updated();

private:
    const QScopedPointer<DpkgPrivate> d_ptr;
    Q_DECLARE_PRIVATE(Dpkg)
};
